package com.campus.service.impl;

import com.campus.dao.TeachingEvaluationDao;
import com.campus.model.TeachingEvaluation;
import com.campus.service.TeachingEvaluationService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeachingEvaluationServiceImpl implements TeachingEvaluationService {

    @Autowired
    private TeachingEvaluationDao teachingEvaluationDao;

    @Override
    public boolean addEvaluation(TeachingEvaluation evaluation) {
        return teachingEvaluationDao.addEvaluation(evaluation);
    }

    @Override
    public TeachingEvaluation getEvaluationById(Integer id) {
        return teachingEvaluationDao.getEvaluationById(id);
    }

    @Override
    public List<TeachingEvaluation> getEvaluationsByCourseAndStudent(Integer courseId, Integer stuInClassId) {
        return teachingEvaluationDao.getEvaluationsByCourseAndStudent(courseId, stuInClassId);
    }
}
